"""
该文件用于清空测试完成后数据库产生的数据
"""
from readsql import read_sql


def clear_data():
    read_sql('delete from article where flag=0')
    read_sql('delete from broken_object where flag=0')
    read_sql('delete from broken_place where flag=0')
    read_sql('delete from camera where flag=0')
    read_sql('delete from chat_message where flag=0')
    read_sql('delete from clazz where flag=0')
    read_sql('delete from clazz_walk where flag=0')
    read_sql('delete from clazz_walk_student where flag=0')
    read_sql('delete from collect where flag=0')
    read_sql('delete from course where flag=0')
    read_sql('delete from course_info where flag=0')
    read_sql('delete from exam where flag=0')
    read_sql('delete from homework where flag=0')
    read_sql('delete from important where flag=0')
    read_sql('delete from lost_object where flag=0')
    read_sql('delete from meeting where flag=0')
    read_sql('delete from meeting_person_info where flag=0')
    read_sql('delete from notice where flag=0')
    read_sql('delete from picture where flag=0')
    read_sql('delete from picture_code where flag=0')
    read_sql('delete from register where flag=0')
    read_sql('delete from role where flag=0')
    read_sql('delete from screen where flag=0')
    read_sql('delete from student where flag=0')
    read_sql('delete from t_leave where flag=0')
    read_sql('delete from upload_resource where flag=0')
    read_sql('delete from user where flag=0')
    read_sql('delete from video where flag=0')
    read_sql('delete from welcome where flag=0')


if __name__ == '__main__':
    cleardata = clear_data()
